--InSbox-4
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity InSbox4 is
    Port ( i : in  STD_LOGIC_VECTOR (3 downto 0);
		o : out  STD_LOGIC_VECTOR (3 downto 0));
end InSbox4;

architecture Behavioral of InSbox4 is

begin
 o <= X"5" WHEN i=X"0" ELSE
              X"0" WHEN i=X"1" ELSE
              X"8" WHEN i=X"2" ELSE
              X"3" WHEN i=X"3" ELSE
              X"A" WHEN i=X"4" ELSE
              X"9" WHEN i=X"5" ELSE
              X"7" WHEN i=X"6" ELSE
              X"E" WHEN i=X"7" ELSE
              X"2" WHEN i=X"8" ELSE
              X"C" WHEN i=X"9" ELSE
              X"B" WHEN i=X"A" ELSE
              X"6" WHEN i=X"B" ELSE
              X"4" WHEN i=X"C" ELSE
              X"F" WHEN i=X"D" ELSE
              X"D" WHEN i=X"E" ELSE
              X"1" WHEN i=X"F" ELSE
              'X';
end Behavioral;